cc.Class({
    extends: cc.Component,

    properties: {
        seats : [cc.Node]
        // foo: {
        //    default: null,      // The default value will be used only when the component attaching
        //                           to a node for the first time
        //    url: cc.Texture2D,  // optional, default is typeof default
        //    serializable: true, // optional, default is true
        //    visible: true,      // optional, default is true
        //    displayName: 'Foo', // optional
        //    readonly: false,    // optional, default is false
        // },
        // ...
    },

    // use this for initialization
    onLoad: function () {
        window.Seats = this.seats;

        setTimeout(function () {
            Seats[0].getComponent("TopCtrl").dealer()
            // Seats[0].getComponent("TopCtrl").mo()

            Seats[1].getComponent("RightCtrl").dealer()
            // Seats[1].getComponent("RightCtrl").mo()

            // Seats[2].getComponent("BottomCtrl").dealer(["15", "17", "25", "25", "27", "27", "27", "39", "39", "39", "39", "41", "43"])
            Seats[2].getComponent("BottomCtrl").dealer(["43", "17", "39", "41", "25", "27", "27", "39", "39", "25", "15", "39", "27"])
            // Seats[2].getComponent("BottomCtrl").mo(["15","17"])

            Seats[3].getComponent("LeftCtrl").dealer()
            // Seats[3].getComponent("LeftCtrl").mo()

            // for(var i = 0; i < 3; i++){
            //     Seats[0].getComponent("TopCtrl").discard(["15","17","25","25","27","28","39","39","43","45"])
            // }
            // for(var i = 0; i < 3; i++){
            //     Seats[1].getComponent("RightCtrl").discard(["15","17","25","25","27","28","39","39","43"])
            // }
            // for(var i = 0; i < 3; i++){
            //     Seats[2].getComponent("BottomCtrl").discard(["15","17","25","25","27","28","39","39","43","45"])
            // }
            // for(var i = 0; i < 3; i++){
            //     Seats[3].getComponent("LeftCtrl").discard(["15","17","25","25","27","28","39","39","43"])
            // }
        }, 0);
    },

    // called every frame, uncomment this function to activate update callback
    // update: function (dt) {

    // },
});
